package com.dbms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dbms.common.annotation.DataSource;
import com.dbms.common.enums.DataSourceType;
import com.dbms.domain.entity.StPptnR;
import com.dbms.mapper.StPptnRMapper;
import com.dbms.service.StPptnRMService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
@RequiredArgsConstructor
public class StPptnRMServiceImpl implements StPptnRMService {

    final StPptnRMapper mapper;

    @Override
    @DataSource(DataSourceType.SQLSERVER)
    public List<StPptnR> queryAllStPptn(String str, String stcd) {
        return mapper.selectList(new LambdaQueryWrapper<StPptnR>()
                .eq(StPptnR::getTm,str)
                .eq(StPptnR::getStcd,stcd)
        );
    }
}
